<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<table class="table table-striped table-bordered table-condensed table-hover ">
  <caption>选择要发起的流程</caption>
  <thead>
  <tr>
    <th>流程名称</th>
    <th>简介</th>
    <th>启动</th>
  </tr>
  </thead>
  <tbody>
  <c:forEach items="${workflowDefines}" var="workflow">
      <c:if test="${workflow.enabled}">
  <tr>
    <td>
    <span style="color:green;font-weight:bolder">
					${workflow.workflowName}
					</span>
        
    </td>
    <td>${workflow.remark}</td>
    <td>
     <button type="button" class="btn btn-success pbtn" onclick="startInit('${workflow.workflowName}')">
					启动流程➹					
					</button>
    </td>
  </tr>
  </c:if>    		    
		</c:forEach>
</tbody>
</table>
<script type="text/javascript">
    function startInit(name){
       	$.post("workflow/start-work!input","workflowName.workflowName="+name,function(html){
    		$("#contentbody").html(html);
    	});
    }
</script>
